/* 基础样式 */
body {
    font-family: 'PingFang SC', 'Helvetica Neue', Arial, sans-serif;
    margin: 0;
    padding: 0;
    background-color: #f5f7fa;
    color: #333;
    line-height: 1.6;
}

.container {
    max-width: 100%;
    padding: 0 15px;
    margin: 0 auto;
}

/* 响应式布局 */
@media (min-width: 768px) {
    .container {
        max-width: 720px;
    }
}

@media (min-width: 992px) {
    .container {
        max-width: 960px;
    }
}

@media (min-width: 1200px) {
    .container {
        max-width: 1140px;
    }
}

/* 头部导航 */
header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 0;
    background-color: #fff;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 100;
}

.logo {
    display: flex;
    align-items: center;
    font-size: 1.5rem;
    font-weight: bold;
    color: #e91e63;
}

.logo i {
    margin-right: 8px;
}

nav ul {
    display: flex;
    list-style: none;
    padding: 0;
    margin: 0;
}

nav li {
    margin: 0 10px;
}

nav a {
    text-decoration: none;
    color: #555;
    font-weight: 500;
    padding: 5px 10px;
    border-radius: 20px;
    transition: all 0.3s;
}

nav a.active, nav a:hover {
    background-color: #f8f9fa;
    color: #e91e63;
}

.user-actions {
    display: flex;
    gap: 10px;
}

.btn {
    padding: 8px 16px;
    border-radius: 20px;
    font-weight: 500;
    cursor: pointer;
    border: none;
    transition: all 0.3s;
}

.btn-outline {
    background-color: transparent;
    border: 1px solid #e91e63;
    color: #e91e63;
}

.btn-primary {
    background-color: #e91e63;
    color: white;
}

/* 主内容区域 */
.main-content {
    display: flex;
    flex-direction: column;
    margin-top: 20px;
    gap: 20px;
}

@media (min-width: 992px) {
    .main-content {
        flex-direction: row;
    }
}

.card-container {
    flex: 1;
}

.sidebar {
    width: 100%;
}

@media (min-width: 992px) {
    .sidebar {
        width: 300px;
    }
}

/* 个人资料卡片 */
.profile-card {
    background-color: white;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

.card-header {
    position: relative;
    height: 300px;
}

.card-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.card-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 20px;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.7));
    color: white;
}

.card-name {
    font-size: 1.5rem;
    font-weight: bold;
    margin-bottom: 5px;
}

.card-info {
    display: flex;
    gap: 15px;
    font-size: 0.9rem;
}

.card-body {
    padding: 20px;
}

.card-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 15px;
}

.tag {
    background-color: #f8f9fa;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 0.85rem;
    color: #555;
}

.card-bio {
    color: #666;
    margin-bottom: 15px;
}

.match-percent {
    color: #e91e63;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 5px;
}

.card-actions {
    display: flex;
    justify-content: space-around;
    padding: 15px 0;
    border-top: 1px solid #eee;
}

.action-btn {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    background-color: transparent;
    font-size: 1.2rem;
    cursor: pointer;
    transition: all 0.3s;
}

.dislike-btn {
    color: #999;
}

.like-btn {
    background-color: rgba(233, 30, 99, 0.1);
    color: #e91e63;
}

.super-like-btn {
    background-color: rgba(255, 193, 7, 0.1);
    color: #ffc107;
}

/* 聊天界面 */
#chat-container {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    background-color: white;
    z-index: 1000;
    display: flex;
    flex-direction: column;
}

#chat-container.hidden {
    display: none;
}

.chat-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px;
    border-bottom: 1px solid #eee;
}

.chat-mode-selector {
    display: flex;
    padding: 10px;
    gap: 10px;
    border-bottom: 1px solid #eee;
}

.chat-mode-btn {
    flex: 1;
    padding: 8px;
    border: none;
    background-color: #f8f9fa;
    border-radius: 8px;
    cursor: pointer;
}

.chat-mode-btn.active {
    background-color: #e91e63;
    color: white;
}

#choose-contact {
    flex: 1;
    overflow-y: auto;
    padding: 15px;
}

.contact-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 10px;
    border-radius: 12px;
    background-color: #f8f9fa;
}

.contact-item img {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    object-fit: cover;
}

.contact-info {
    flex: 1;
}

.contact-name {
    font-weight: 500;
}

.contact-status {
    font-size: 0.85rem;
    color: #999;
}

#chat-main {
    display: flex;
    flex-direction: column;
    flex: 1;
}

.chat-messages {
    flex: 1;
    padding: 15px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.message {
    max-width: 80%;
    padding: 10px 15px;
    border-radius: 18px;
    position: relative;
}

.message.sent {
    align-self: flex-end;
    background-color: #e91e63;
    color: white;
    border-bottom-right-radius: 5px;
}

.message.received {
    align-self: flex-start;
    background-color: #f0f0f0;
    border-bottom-left-radius: 5px;
}

.message.system {
    align-self: center;
    background-color: #e0f7fa;
    color: #0097a7;
    font-size: 0.9rem;
}

.chat-input-area {
    padding: 15px;
    border-top: 1px solid #eee;
}

.message-input {
    display: flex;
    gap: 10px;
}

.message-input input {
    flex: 1;
    padding: 12px 15px;
    border-radius: 24px;
    border: 1px solid #ddd;
    outline: none;
}

.message-input button {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    background-color: #e91e63;
    color: white;
    cursor: pointer;
    font-size: 1.2rem;
}

.game-question-area {
    margin-bottom: 15px;
}

.question-prompt {
    margin-bottom: 10px;
    font-weight: 500;
}

.question-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.question-btn {
    padding: 8px 15px;
    background-color: #f8f9fa;
    border: 1px solid #ddd;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.3s;
}

.question-btn:hover {
    background-color: #e91e63;
    color: white;
    border-color: #e91e63;
}

/* 其他部分样式 */
.widget {
    background-color: white;
    border-radius: 16px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
}

.widget-title {
    margin-top: 0;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 1.1rem;
}

.match-stats {
    display: flex;
    justify-content: space-around;
    text-align: center;
    margin-bottom: 20px;
}

.stat-value {
    font-size: 1.5rem;
    font-weight: bold;
    color: #e91e63;
}

.stat-label {
    font-size: 0.85rem;
    color: #777;
}

.progress-container p {
    margin-bottom: 5px;
    font-size: 0.9rem;
}

.progress-bar {
    height: 8px;
    background-color: #f0f0f0;
    border-radius: 4px;
    overflow: hidden;
}

.progress {
    height: 100%;
    width: 75%;
    background-color: #e91e63;
    border-radius: 4px;
}

.map-container {
    height: 150px;
    background-color: #f0f0f0;
    border-radius: 12px;
    position: relative;
    overflow: hidden;
}

.map-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: rgba(0, 0, 0, 0.3);
    color: white;
    font-weight: 500;
}

.matches-container {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.match-card {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    background-color: #f8f9fa;
    border-radius: 12px;
}

.match-img {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    object-fit: cover;
}

.match-info {
    flex: 1;
}

.match-name {
    font-weight: 500;
}

.match-distance {
    font-size: 0.85rem;
    color: #777;
    display: flex;
    align-items: center;
    gap: 4px;
}

.match-percent {
    font-weight: bold;
    color: #e91e63;
}

.section-title {
    margin: 30px 0 20px;
    text-align: center;
    font-size: 1.5rem;
    color: #333;
}

.features {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
    margin-bottom: 40px;
}

@media (min-width: 768px) {
    .features {
        grid-template-columns: repeat(3, 1fr);
    }
}

.feature-card {
    background-color: white;
    border-radius: 16px;
    padding: 25px;
    text-align: center;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s;
}

.feature-card:hover {
    transform: translateY(-5px);
}

.feature-icon {
    width: 70px;
    height: 70px;
    background-color: #fce4ec;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    color: #e91e63;
    font-size: 1.8rem;
}

.feature-title {
    margin-top: 0;
    margin-bottom: 12px;
    font-size: 1.2rem;
}

.feature-desc {
    color: #666;
    font-size: 0.95rem;
    margin: 0;
}

.testimonials {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
    margin-bottom: 40px;
}

@media (min-width: 768px) {
    .testimonials {
        grid-template-columns: repeat(3, 1fr);
    }
}

.testimonial {
    background-color: white;
    border-radius: 16px;
    padding: 20px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
}

.testimonial-header {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 15px;
}

.testimonial-img {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    object-fit: cover;
}

.testimonial-name {
    font-weight: 500;
}

.testimonial-date {
    font-size: 0.85rem;
    color: #777;
}

.testimonial-content {
    color: #555;
    font-style: italic;
    margin: 0;
}

footer {
    background-color: #2c3e50;
    color: white;
    padding: 40px 0 20px;
    margin-top: 50px;
}

.footer-content {
    display: grid;
    grid-template-columns: 1fr;
    gap: 30px;
    margin-bottom: 30px;
}

@media (min-width: 768px) {
    .footer-content {
        grid-template-columns: repeat(3, 1fr);
    }
}

.footer-column h3 {
    margin-top: 0;
    margin-bottom: 20px;
    font-size: 1.2rem;
}

.footer-links {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-links li {
    margin-bottom: 12px;
}

.footer-links a {
    color: #bdc3c7;
    text-decoration: none;
    transition: color 0.3s;
    display: flex;
    align-items: center;
    gap: 8px;
}

.footer-links a:hover {
    color: white;
}

.social-links {
    display: flex;
    gap: 15px;
    margin-top: 20px;
}

.social-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    color: white;
    font-size: 1.2rem;
    transition: background-color 0.3s;
}

.social-link:hover {
    background-color: #e91e63;
}

.copyright {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    color: #bdc3c7;
    font-size: 0.9rem;
}

/* 移动设备适配 */
@media (max-width: 767px) {
    header {
        flex-wrap: wrap;
    }
    
    nav {
        order: 3;
        width: 100%;
        margin-top: 15px;
    }
    
    nav ul {
        justify-content: center;
    }
    
    .user-actions {
        margin-left: auto;
    }
    
    .card-header {
        height: 250px;
    }
    
    .card-actions {
        justify-content: space-between;
        padding: 10px;
    }
    
    .action-btn {
        width: 45px;
        height: 45px;
    }
}

/* 功能选择区域 */
.feature-selection {
    padding: 30px 0;
    background-color: #fff;
    margin-top: 20px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.feature-selection .section-title {
    margin-top: 0;
    margin-bottom: 30px;
}

.selection-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
}

.selection-card {
    background-color: #f8f9fa;
    border-radius: 12px;
    padding: 25px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 1px solid #eee;
}

.selection-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
    border-color: #e91e63;
}

.selection-card i {
    font-size: 2.5rem;
    color: #e91e63;
    margin-bottom: 15px;
    display: block;
}

.selection-card h3 {
    font-size: 1.3rem;
    margin-bottom: 10px;
    color: #333;
}

.selection-card p {
    font-size: 0.95rem;
    color: #666;
    margin: 0;
}

/* 未读消息气泡 */
.unread {
    background-color: #e91e63; /* 主题粉色 */
    color: white;
    border-radius: 50%;
    padding: 0; /* 调整内边距以适应固定宽高 */
    font-size: 0.75rem;
    font-weight: bold;
    width: 20px; /* 固定宽度 */
    height: 20px;   /* 固定高度 */
    display: inline-flex; /* 使用flex布局使内容居中 */
    align-items: center;
    justify-content: center;
    margin-left: 5px; /* 与其他元素间隔 */
    line-height: 1; /* 确保数字在气泡中垂直居中 */
    box-sizing: border-box; /* 确保padding和border不增加总宽高 */
    text-align: center; /* 确保数字水平居中 */
}
